PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Appearance Manager >

Programming With the Appearance Manager


DrawThemeTab

Draws a tab.

pascal OSStatus DrawThemeTab (
                     const Rect *inRect,
                     ThemeTabStyle inStyle,
                     ThemeTabDirection inDirection,
                     ThemeTabTitleDrawUPP labelProc,
                     UInt32 userData);
inRect
A pointer to a structure of type Rect . Before calling DrawThemeTab , set the rectangle to the bounds of the tab, in local coordinates. There are two standard sizes (or heights) for tabs that should be used in your calculation of the tab rectangle--these are measured by the distance the tabs protrude from the pane. Small tabs have a height of 16 pixels; large tabs have a height of 21 pixels. (The widths of tabs are variable.) Additionally, the distance that the tab overlaps the pane must be included in the tab rectangle; this overlap distance is always 3 pixels, although the 3-pixel overlap is only drawn for the front tab. The tab rectangle should reflect the orientation of the tab that is specified in the inDirection parameter.
inStyle
A value of type ThemeTabStyle . Pass a constant specifying the relative position (front or non-front) and state of the tab. See Theme Tab Style Constants for descriptions of possible values.
inDirection
A value of type ThemeTabDirection . Pass a constant specifying the direction in which to orient the tab. See Theme Tab Direction Constants for descriptions of possible values.
labelProc
A value of type ThemeTabTitleDrawUPP . Pass a universal procedure pointer to an application-defined function such as that described in MyThemeTabTitleDrawProc . DrawThemeTab calls your function to draw the title of the tab. If you pass NULL , no drawing occurs.
userData
An unsigned 32-bit integer. Provide any data to be passed in to the userData parameter of the callback function specified in the labelProc parameter.
function result
A result code; see Result Codes .
DISCUSSION

The DrawThemeTab function draws a theme-compliant tab. A tab control consists of two basic components: multiple tabs that label the various content pages that can be displayed and a single pane upon which the content for each tab is drawn. Use the function DrawThemeTabPane to draw the tab pane. The Appearance Manager coordinates the appearance of the pane and frontmost tab automatically.

VERSION NOTES

Available with Appearance Manager 1.1 and later.


© 1999 Apple Computer, Inc. – (Last Updated 29 April 99)